﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ThePresenter.Polls.Data
{
	[Serializable]
	public class PickOneAnswerData : AnswerData
	{
		public bool this[int index]
		{
			get {
				if (this.SelectedItemIndex == index)
					return true;
				else
					return false;
			}
			set {
				if (value)
				{
					this.SelectedItemIndex = (byte)index;
				}
			}
		}

		public int SelectedItemIndex
		{
			get;
			set;
		}

		public PickOneAnswerData()
		{
			SelectedItemIndex = -1;
		}
	}	
}
